import {
    payrollList
} from '../../api/app'
import user from '../../utils/user'
Page({
    data: {
        data: []
    },
    async onLoad() {
        if (!user.userId) {
            return
        }
        const result = await payrollList()
        this.setData({
            data: result.list
        })
    },
    goDetail(event) {
        wx.navigateTo({
            url: '/pages/payroll-detail/payroll-detail?id=' + event.currentTarget.dataset.id,
        })
    }
})